<template>
  <div>
    <h2>子组件</h2>
    <hr />
    获得钱财 {{ mony }}
    <button @click="updateMony(500)">点击增加</button>
  </div>
</template>

<script setup>
import { inject } from "vue";

let mony = inject("mony");
let updateMony = inject("updateMony");
</script>

<style lang="scss" scoped></style>
